using MediatR;
using TerritoryGame.Domain.ValueObjects;

namespace TerritoryGame.Application.Commands;

public record JoinGameCommand : IRequest<JoinGameResult>
{
    public required string RoomCode { get; init; }
    public required PlayerNickname Nickname { get; init; }
    public string? Password { get; init; }
}

public record JoinGameResult
{
    public required GameId GameId { get; init; }
    public required PlayerId PlayerId { get; init; }
    public required bool Success { get; init; }
    public string? ErrorMessage { get; init; }
}
